package cn.jiyun.mapper;

import cn.jiyun.pojo.Constactor;
import cn.jiyun.pojo.Developer;
import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

public interface ConstactorMapper {

    @Select("select * from constactor")
    List<Constactor> init2();

    List<Map> findPage(@Param("currentPage") int i, @Param("pageSize") Integer pageSize, @Param("queryString") String queryString);

    @Select("select count(1) from constactor where flag=1")
    int jilu();

    @Insert("INSERT INTO `aniu_kaifa`.`constactor` (`cid`, `cname`, `updatetime`) VALUES (null,#{cname},#{updatetime})")
    int add(Constactor constactor);

    @Delete("delete from constactor where cid=#{cid}")
    void delete(Integer cid);

    @Select("select * from constactor where cid=#{cid}")
    List<Constactor> findById(Integer cid);

    @Update("UPDATE\n  `aniu_kaifa`.`constactor` SET  `cname` =#{cname}  `updatetime` =#{updatetime}  WHERE `cid` =#{cid}")
    int edit(Constactor constactor);
}
